Systems and methods for an encoder and control scheme

ABSTRACT

Systems and methods for an encoder and control scheme are provided. In one embodiment, a micro-electromechanical system (MEMS) device comprises: a stator having a first marker and a second marker arranged on a surface of the stator to form a sensing pattern; a sweeping element that dithers in a plane parallel to the surface of the stator along a sweep path that crosses the first marker and a second marker; an overlap sense circuit operable to measure an area overlap between the sweeping element and the sensing pattern, wherein the overlap sense circuit generates a pulse train signal output that varies as a function of the area overlap.

This application claims the benefit of U.S. Provisional Application No.61/479,783, filed on Apr. 27, 2011, which is incorporated herein byreference in its entirety.

BACKGROUND

A rotary encoder is a device used to precisely measure an angle ofrotation in a rotational stage of a micro-electromechanical system(MEMS) device. One problem with encoder devices currently available isthat they tend to produce a drift error due to physical expansions andshrinkage in structure due to changes in temperature conditions.

For the reasons stated above and for other reasons stated below whichwill become apparent to those skilled in the art upon reading andunderstanding the specification, there is a need in the art for methodsand systems for an encoder and control scheme.

SUMMARY

The embodiments of the present invention provide methods and systems foran encoder and control scheme and will be understood by reading andstudying the following specification.

In one embodiment, a micro-electromechanical system (MEMS) devicecomprises: a stator having a first marker and a second marker arrangedon a surface of the stator to form a sensing pattern; a sweeping elementthat dithers in a plane parallel to the surface of the stator along asweep path that crosses the first marker and a second marker; an overlapsense circuit operable to measure an area overlap between the sweepingelement and the sensing pattern, wherein the overlap sense circuitgenerates a pulse train signal output that varies as a function of thearea overlap.

DRAWINGS

Embodiments of the present invention can be more easily understood andfurther advantages and uses thereof more readily apparent, whenconsidered in view of the description of the preferred embodiments andthe following figures in which:

FIG. 1 is a diagram illustrating an encoder of one embodiment of thepresent invention;

FIG. 1A is a diagram illustrating an encoder of one embodiment of thepresent invention;

FIG. 2 is a diagram illustrating an encoder of one embodiment of thepresent invention;

FIG. 3 is a diagram illustrating a pulse train signal output fromencoder of one embodiment of the present invention;

FIG. 4 is a diagram illustrating an encoder of one embodiment of thepresent invention;

FIG. 5 is a diagram illustrating a pulse train signal output fromencoder with a pulse width modulation of the pulse train signal outputfor one embodiment of the present invention;

FIG. 6 is a diagram illustrating a dithering measurement and controlcircuit for an encoder of one embodiment of the present invention;

FIG. 7 is a diagram illustrating an encoder of one embodiment of thepresent invention;

FIGS. 8A and 8B are a diagrams illustrating MEMS devices thatincorporate an encoder of one embodiment of the present invention; and

FIG. 9 is a flow chart of a method of one embodiment of the presentinvention;

In accordance with common practice, the various described features arenot drawn to scale but are drawn to emphasize features relevant to thepresent invention. Reference characters denote like elements throughoutfigures and text.

DETAILED DESCRIPTION

FIG. 1 is a diagram illustrating an encoder 100 of one embodiment of thepresent invention. In the embodiment of FIG. 1, encoder 100 is a rotarydecoder comprising a first member that functions as a stator 115 and asweeping element 120 that dithers in a plane parallel to stator 115about axis 121. Because the sweep path traveled by sweeping element 120is a rotary sweep path, sweeping element 120 for such an embodiment isalso referred to herein as rotor 120. Stator 115 includes a first marker110 and a second marker 112 which are utilized by encoder 100 indetecting and controlling the amplitude of the angle of sinusoidaldithering of rotor 120.

To provide a simplified explanation, the interaction between firstmarker 110 and rotor 120 are first discussed with reference to FIG. 2.For this particular embodiment, marker 110 and rotor 120 are bothrectangular in shape having dimensions of “d” in width and “D” inlength. Marker 110 and rotor 120 and are arranged and aligned such thataxis 121 passes through the center points of both marker 110 and rotor120. As rotor 120 rotates about axis 121, the area “A” of overlapbetween the two elements changes as a function of angular rotation αsuch that:

$\begin{matrix}{A = \left\{ \begin{matrix}{{dD} - {\frac{D^{2}}{4}\sin\;\alpha}} & {0 < \alpha < \frac{2d}{D}} \\\frac{d^{2}}{\sin\;\alpha} & {\frac{2d}{D} < \alpha < \theta_{A}}\end{matrix} \right.} & \left( {{Eq}.\mspace{14mu} 1} \right)\end{matrix}$

where θ_(A) is the amplitude of rotation. This function for area issymmetric for positive and negative values of α. That is, as sweepingelement 120 is dithered in angle α between −θ_(A) and +θ_(A), the area,A, of overlap between element 120 and marker 110 will vary as a functionof α, having a peak in value when they are directly aligned and theangle between the two is zero (α=0).

Returning to FIG. 1, the first marker 110 and second marker 112 are bothidentical in dimensions and both centered about axis 121 but are offsetin rotation with respect to each other by the precisely known angle of θto form an “X” sensing pattern (shown generally at 125) on stator 115.Continuing from the discussion above with respect to FIG. 2, an area A₁of overlap between rotor 120 and first marker 110 will follow equationEq. 1 as a function of angular rotation α₁. In the same way, and area A₂of overlap between rotor 120 and second marker 112 will also followequation Eq. 1 as a function of angular rotation α₂. The total area ofoverlap A_(T) between rotor 120 and the sensing pattern 125 formed bythe markers 110 and 112 could therefore readily be expressed as functionof angular rotation α_(SE) of rotor 120 with respect to axis of symmetry130. Each time rotor 120 passes over either marker 110 or maker 112, apeak in total overlapping area A_(T) occurs. A minimum in totaloverlapping area A_(T) occurs when rotor 120 is rotated to an angularposition α_(SE)=0 directly between markers 110 and 112. When the angularpositions of markers 110 and 112 are known, encoder 100 thus provides aprecision means for detecting when rotor 120 is aligned with thesemarkers and the precise angular rotation α_(SE) of rotor 120 duringthose instances of time.

In one embodiment, a value for the overlapping area A_(T) is measuredusing overlap sensor circuit 140. In one embodiment, overlap sensorcircuit 140 generates a signal representing total overlapping area A_(T)by capacitive detection. In one such embodiment (shown by FIG. 1A),rotor 120 and markers 110, 112 are each metallic strips with a biasvoltage Vb applied to the “X” sensing pattern 125 and the sensingcircuit 140 designed as a charge amplifier. As the rotor 120 is ditheredat the amplitude of θ_(A), the output from the charge amplifier/overlapsensor circuit 140 will peak each time the rotor passes over one of themarkers 110, 112.

FIG. 3 illustrates a signal generally at 300 representing the output 142from overlap sensor circuit 140. In operation, starting at position 301,when rotor 120 rotates clockwise to approach and pass over marker 112,the capacitance measurement signal will rapidly increase to form a pulse(shown at 310), peaking when rotor 120 and marker 212 have theirgreatest overlap and falling as element 120 continues clockwise pastmarker 112. When the angular rotation α_(SE) reaches +θ_(A) (shown atposition 302), rotor 120 is driven to rotate back in thecounter-clockwise direction. Rotor 120 again passes over marker 112 andthe capacitance measurement signal 300 will again form a pulse (as shownat 312) peaking when rotor 120 and marker 112 have the greatest overlapand then falling as element 120 continues to rotate counter-clockwise.

As rotor 120 continues counter-clockwise past α_(SE)=0 (shown at 303),it will pass over the first marker 110, and the signal 300 will pulse(shown at 314), peaking when rotor 120 and marker 210 have theirgreatest overlap and falling once rotor 120 passes second marker 110.

When the angular rotation α_(SE) reaches −θ_(A) (shown at position 304),rotor 120 is driven to rotate back in the clockwise direction. Rotor 120once again passes over marker 110 and the signal 300 will again pulse(shown at 316), peaking when rotor 120 and marker 210 have the greatestoverlap. The resulting signal 300 forms a pulse train signal 300 whereeach pulse represent an maximum in total overlapping area A_(T) betweenrotor 120 and the X sensing pattern 125 formed by markers 110 and 112.

Although the above describes generation of pulse train signal 300 basedon capacitance measurements, in other embodiment, overlap sensingcircuit 140 uses other proxy measurements for detecting the totaloverlapping area A_(T) between rotor 120 and markers 110 and 112 togenerate pulse train signal 300. Such alternates are contemplated aswithin the scope of embodiments of the present invention. For example,in one alternate embodiment, encoder 100 employs optics to detect theoverlap. One such example is shown in FIG. 4 where overlap sensingcircuit 140 further includes a light source 405 and photo-detector 410.In this configuration, rotor 120 and markers 110 and 112 are within inthe optical path between light source 405 and photo-detector 410 andthus partially obstruct light from reaching photo-detector 410. Whenrotor 120 reaches a local maximum of overlap with either marker 110 or112, a peak in the in the amount of light reaching photo-detector 410will occur. Thus, the output of photo-detector will generate a pulsetrain signal with peaks that indicates the position of rotor 120 in thesame manner as shown by pulse train signal 300. Embodiments based onreflectance of light, rather than obstruction of light, are alsocontemplated. For example, in one embodiment device 100 further (oralternately) includes a photo-detector 412 that measures light reflectedfrom stator 115. There, stator 115 may include a reflective surface thatis partially covered by non-reflective markers 110, 112 and rotor 120.As such, when rotor 120 is dithered as described above, photo-detector412 will output a signal indicating peaks of reflected light where rotor120 is aligned with markers 110, 112.

Regardless of the means used by overlap sensor circuit 150 to generatepulse train signal 300, the peaks at 310, 312, 314 and 316 preciselyindicate when rotor 120 is rotated to a position aligned with eithermarker 110 or marker 120. As would be evident to one of ordinary skillin the art after studying this disclosure, in still other embodiments,additional markers in other patterns may be placed onto a stator and apulse train signal utilized to detect when overlapping peaks.

From pulse train signal 300, one or more embodiments of the presentinvention generate a +/− pulse width modulation signal which iscontrolled to an average value of zero volts by controlling θ_(A), theamplitude of oscillation of rotor 120. That is, the pulse widthmodulation signal toggles between two values every time a pulse occursin the pulse train signal 300. One such pulse width modulation signal510 is illustrated in FIG. 5 aligned in time with pulse train signal300. Each time pulse train signal 300 peaks at 310, 312, 314 and 315,pulse width modulation signal 510 will toggle between the values of +Uand −U. For example, in one embodiment, when a point on the leading edgeof peak 310 is detected, pulse width modulation signal 510 toggles from−U to +U indicating that rotor 120 has rotated clockwise past marker212. When rotor 120 returns past marker 212 in the counter-clockwisedirection, the leading edge of peak 312 is detected and pulse widthmodulation signal 510 toggles from +U to −U. Then when the leading edgeof peak 314 is detected, pulse width modulation signal 510 toggles from−U to +U indicating that rotor 120 has rotated counter-clockwise pastmarker 210. When rotor 120 returns past marker 210 in the clockwisedirection, the leading edge of peak 316 is detected and pulse widthmodulation signal 510 toggles from +U to −U.

The occurrence of toggling in pulse width modulation signal 510 between+U and −U thus indicates when rotor 120 is at an angular rotation αequal to that of one of the markers 110, 112. Further the value of pulsewidth modulation signal 510 indicates whether the angular rotationα_(SE) is greater absolute value than the respective angular positionsθ_(M1), θ_(M2) of markers 110, 112. That is, in FIG. 5, pulse widthmodulation signal 510 has a value of −U when rotor 120 is between eitherof markers 110, 112 and α_(SE)=0 (i.e., |θ_(M1)|>|α_(SE)|<|θ_(M2)|).Pulse width modulation signal 510 has a value of +U when rotor 120 isbetween marker 110 and α=−θ_(A), (i.e., |θ_(M1)|<|α_(SE)|) or betweenmarker 112 and α=+θ_(A) (i.e., |θ_(M2)|<|α_(SE)|).

As dithering amplitude of rotor 120 is increased, the duty cycle ofpulse width modulation signal 510 will approach 50%, which occurs whenthe value of signal 510 is at +U for a period of time equal to when thevalue of signal is at −U. A duty cycle of 50% will occur precisely whenrotor 120 is driven to an amplitude of rotation θ_(A) equal to thesquare root of two times θ_(M), (θ_(A)=√2×θ_(M)), where θ_(M) is theangular position of markers 110, 112.

FIG. 6 illustrates a dither control circuit 600 of one embodiment of thepresent invention. Dither control circuit 600 comprises an encoder 610,such as rotary encoder 100, that produces a pulse train signal output612, such as pulse train signal 300. For example, in one embodiment thepulse train signal is the result of a transimpedance amplifier hooked upto a capacitive encoder.

The pulse train signal output 612 is then provided to a pulse-widthmodulator 630 which produces the pulse width modulation signal 632 (suchas pulse width modulation signal 500). In one embodiment, a comparator620 receives pulse train signal output 612 (which in some embodimentsmay be optionally amplified by an amplifier 614 (such as atransimpedance amplifier) and/or filtered by band pass filter 616) andcompares the level of pulse train signal output 612 against a referencevalue (V_(R) shown at 622) in order to detect leading edges of peaks(such as 310, 312, 314 and 316). In the particular embodiment of FIG. 6,pulse-width modulator 630 is implemented using a T flip-flop 632 that isconfigured to change states and toggle the polarity of its outputbetween positive and negative each time comparator 620 detects a leadingedge of a pulse in pulse train signal output 612. In one embodiment, thepolarity and toggle points provided by the pulse width modulation signal632 can then be used, for example, to determine the position of rotor120 with respect to markers 110 and 112.

In one embodiment, the pulse width modulation signal 632 is alsoutilized to control the dithering of encoder 610. The pulse widthmodulation signal 632 is fed back to a controller 640, which in theembodiment of FIG. 6 further comprises an integrator 642 and a feedbackcontroller 644. In one embodiment, feedback controller 644 isimplemented using a proportional-integral-derivative controller (PIDcontroller), for example. In one embodiment, integrator 642 isimplemented using a low pass filter (LPF) device. The output ofcontroller 640 feeds sweeping element drive 650, which in turn controlsthe angle amplitude of encoder 610.

In operation, integrator 642 performs a summation of pulse widthmodulation signal 632. When the net sum output of integrator 640 isnon-zero, that means the duty cycle of pulse width modulation signal 632is either less than or greater than a 50% duty cycle. A non-zero net sumoutput of integrator 640 indicates either 1) that the pulse widthmodulation signal 632 is toggled to a + value for a longer period percycle than a − value, or 2) that pulse width modulation signal 632 istoggled to a − value for a longer period per cycle than a + value.Feedback controller 644 receives as its input the net sum output ofintegrator 640. Using that input, in one embodiment, feedback controller644 adjusts sweeping element drive 650 to obtain a zero net sum outputfrom integrator 640. In an embodiment where encoder 610 is the encoder100 of FIG. 1, controller 644 will adjust rotor drive 650 to obtain azero output from integrator 642. At that point, rotor 120 will have anamplitude of rotation θ_(A)=√2×θ_(M), where θ_(M) is the angularposition of markers 110, 112. At that amplitude of rotation, pulse widthmodulation signal 632 will have the desired 50% duty cycle. It should beunderstood that for some embodiments, fine control of the ditheringamplitude can be achieved by providing a non-zero reference to thefeedback controller 644 rather than a zero reference.

An encoder having radial symmetry, such as encoder 110, has theadvantage of maintaining precision under changing thermal conditions.That is, when changing thermal conditions cause components of encoder110 to expand or contract, the rotor 120 and markers 110, 112 will do soin a radial nature, which will not alter the angle between markers 110or 112 or the position of rotor 120 with respect to markers 110, 112.For this reason, the amplitude of rotation θ_(A) needed to produce a 50%duty cycle does not change due to thermal expansion or contraction ofencoder 110. Similarly, rotor 120 rotates in a plane some gap distanceabove the plane of markers 110, 112. If this gap distance changes due torelatively slowly varying changes in thermal conditions, the amplitudevalue of pulses in pulse train signal 300 may change, but the distancein time between the pulses will remain the same. Accordingly, theresulting pulse width modulation signal 510 will not be affected bychanges in thermal conditions. Further, controlling dithering of anencoder to a 50% duty cycle also allows for canceling out of othergeometrical changes that could cause amplitude problems.

FIG. 7 illustrates another embodiment where an encoder 700 dithers alonga linear sweep path 702 in the plane parallel to the stator 715. Thefirst marker 710 and the second marker 712 are oriented parallel to eachother along the linear sweep path 702. In the same way described abovewith respect to encoder 100, at sweeping element 720 dithers along sweeppath 702 from −A to +A, the area overlap between sweeping element 720and the sensing pattern 725 formed by markers 710 and 712 will vary suchthat overlap sensing circuit 140 will again produce a pulse train signal300 where the pulses indicate instances of maximum overlap. As above, inone alternate embodiment, overlap sensing circuit 140 can usecapacitance to determine overlap between the sweeping element 720 andthe sensing pattern 725. In another alternate embodiment, overlapsensing circuit 140 can further comprise one or more photo-detectors410, 412 and a light source 405 to determine overlap using optics asdescribed above in FIG. 4. Pulse train signal 300 can then be processedto produce a pulse width modulated signal as describe with respect toFIGS. 5 and 6.

As described in FIG. 1-7 above, embodiments of the present inventionenable precise control of micro-element dithering using rotary motion orlinear motion in micro-scale devices such as micro-electromechanicalsystems (MEMS). There are various applications for such precisioncontrol of micro-elements within a MEMS which are contemplated as withinthe scope of embodiments of the present invention. For example, in oneembodiment FIG. 8A illustrates a device 801 that includes MEMS elements.An encoder 910 (which in some embodiments can be encoder 100 or encoder700, for example) is physically coupled to a mirror 820 to provide forprecision mirror dithering. For example, in one such embodiment either adirect or indirect linkage between sweeping element 120 or 720 andmirror 820 precisely controls mirror 820 positioning within a MEMSdevice 801. In one embodiment, encoder 810 is monitored and controlledusing a dither control circuit comprising a pulse width modulator 630,controller 640 and sweep element drive 650 such as described above withrespect to FIG. 6.

Another embodiment of a device 861 including MEMS elements isillustrated in FIG. 8B. An encoder 850 (which in some embodiments can beencoder 100 or encoder 700, for example) is utilized to eliminate sensorbias by dithering the input axis of a MEMS gyroscope 860. For example,in one embodiment, gyroscope 860 measures rotation about an input axis862. A sensor bias error is always present in the rotational measurementoutput of gyroscope 860. This sensor bias error is independent if wherethe gyroscope is pointing. By dithering the orientation of input axis862 at a known dithering frequency, the change in the gyroscope's output864 actually caused by rotational motion of device 861 is dithered atthe dithering frequency. Sensor bias error, however, is not ditheredbecause the error is independent of orientation. This permits separationof the real rotational data from the bias error by demodulating thedithered signal output 865 based on the dithering frequency. In oneembodiment, encoder 850 is monitored and controlled using a dithercontrol circuit comprising a pulse width modulator 630, controller 640and sweep element drive 650 such as described above with respect to FIG.6.

FIG. 9 is a flow chart illustrating a method for controlling ditheringin a micro-electrical mechanical system (MEMS) device. The method ofFIG. 9 in one or more embodiments can be applied to any of thestructures described above with respect to FIGS. 1-7 and 8A, 8B. Themethod begins at 910 with moving a sweeping element that dithers in aplane parallel to a surface of a stator, the stator having a firstmarker and a second marker arranged on the surface of the stator to forma sensing pattern, wherein the sweeping element follows a sweep paththat crosses the first marker and a second marker. In one embodiment,the sweeping element is a rotor that dithers in angle in the planeparallel to the stator about an axis and the first marker and the secondmarker form an X sensing pattern centered at the axis. The rotaryencoder 100 as illustrated in FIG. 1 above provides an example of onesuch embodiment. In another embodiment, the sweeping element dithersalong a linear sweep path in the plane parallel to the stator and thefirst marker and the second marker are oriented parallel to each otheralong the linear sweep path. The linear encoder 700 as illustrated inFIG. 7 above provides an example of one such embodiment.

The method next proceeds to 920 with sensing an area overlap between thesweeping element and the sensing pattern. There are alternate meansavailable for sensing the area overlap, and as described above include,but are not limited to, optical and capacitive sensing.

The method proceeds to 930 with generating a pulse train signal outputthat varies as a function of the area overlap. In one embodiment, wherecapacitive sensing is used at block 820, the pulse train signal isgenerated as a function of capacitance between the sweeping element andthe sensing pattern. In one embodiment, where optical sensing is used atblock 820, the pulse train signal is generated as a function of lightfrom a light source as received by at least one photo-detector.

The method proceeds to 940 with pulse-width-modulating to produce apulse width modulated signal from the pulse train signal. In oneembodiment, pulse-width-modulating is performed using a pulse widthmodulator such as pulse width modulator 610 describe above with respectto FIG. 6. The pulse train signal is provided to the pulse-widthmodulator which produces the pulse width modulation signal (such aspulse width modulation signal 500). In one embodiment, the pulse widthmodulator comprises a comparator that receives the pulse train signaloutput and compares the level of the pulse train signal output against areference value in order to detect leading edges of peaks (such as 310,312, 314 and 316). In one embodiment a flip-flop is configured to changestates and toggle a polarity of its output between positive and negativeeach time the comparator detects a leading edge of a pulse in the pulsetrain signal. The polarity and toggles points provided by the pulsewidth modulation signal can then be used to determine the position ofthe sweeping element with respect to the first and second markers.

In one embodiment, the method optionally proceeds to 950 withcontrolling a dithering amplitude of the sweeping element to drive thepulse width modulated signal to a duty cycle of 50%. This, in oneembodiment, is performed as described above with respect to FIG. 6. Thatis, the pulse width modulation signal is fed back to a controller whichcan include an integrator and a feedback controller (such as aproportional-integral-derivative controller—PID controller, forexample). The integrator can be implemented using a low pass filterdevice. The output of the controller feeds a sweeping element drive,which in turn controls the angle amplitude (and optionally the ditheringrate) of the sweeping element.

In operation, the integrator performs a summation of the pulse widthmodulation signal and the feedback controller drives the sweepingelement drive in order to obtain a zero net sum output from theintegrator. When the net sum output of the integrator is non-zero, thatmeans the duty cycle of the pulse width modulation signal is either lessthan or greater than a 50% duty cycle. When the net sum output of theintegrator is zero, the pulse width modulation signal will have thedesired 50% duty cycle.

Several means are available to implement the systems and methods of thecurrent invention as discussed in this specification. For example, thepulse width modulators, controllers, overlap sensing circuits, can berealized through discrete electronics, digital computer systems, digitalsignal processors, microprocessors, programmable controllers and fieldprogrammable gate arrays (FPGAs) or application-specific integratedcircuits (ASICs). Therefore other embodiments of the present inventionare program instructions resident on computer readable media which whenimplemented by such means enable them to implement embodiments of thepresent invention. Computer readable media are any form of a physicalcomputer memory storage device. Examples of such a physical computermemory device include, but is not limited to, punch cards, magneticdisks or tapes, optical data storage system, flash read only memory(ROM), non-volatile ROM, programmable ROM (PROM), erasable-programmableROM (E-PROM), random access memory (RAM), or any other non-transitoryform of permanent, semi-permanent, or temporary memory storage system ordevice. Program instructions include, but are not limited tocomputer-executable instructions executed by computer system processorsand hardware description languages such as Very High Speed IntegratedCircuit (VHSIC) Hardware Description Language (VHDL).

A number of embodiments of the invention defined by the following claimshave been described. Nevertheless, it will be understood that variousmodifications to the described embodiments may be made without departingfrom the spirit and scope of the claimed invention. Accordingly, otherembodiments are within the scope of the following claims.

What is claimed is:
 1. A micro-electromechanical system (MEMS) device,the device comprising: a stator having a first marker and a secondmarker arranged on a surface of the stator to form a sensing pattern; asweeping element that dithers in a plane parallel to the surface of thestator along a sweep path that crosses the first marker and a secondmarker; and an overlap sense circuit operable to measure an area overlapbetween the sweeping element and the sensing pattern, wherein theoverlap sense circuit generates a pulse train signal output that variesas a function of the area overlap.
 2. The device of claim 1, wherein thesweeping element is a rotor that dithers in angle in the plane parallelto the stator about an axis, and the first marker and the second markerform an X sensing pattern centered at the axis.
 3. The device of claim1, wherein the sweeping element dithers along a linear sweep path in theplane parallel to the stator, and the first marker and the second markerare oriented parallel to each other along the linear sweep path.
 4. Thedevice of claim 1, wherein the overlap sense circuit is electricallycoupled to the first marker, the second marker and the sweeping element;and wherein the overlap sense circuit measures a capacitance between thesweeping element and the sensing pattern to generate the pulse trainsignal that varies as a function of the area overlap.
 5. The device ofclaim 1, wherein the overlap sense circuit further comprises: a lightsource; and at least one photo-detector; wherein the pulse train signaloutput is generated as a function of light from the light sourcereceived by the at least one photo-detector.
 6. The device of claim 1,wherein the sweeping element is linked to a MEMS gyroscope device suchthat dithering of the sweeping element causes dithering of anorientation of an input axis of the MEMS gyroscope.
 7. The device ofclaim 1, wherein the sweeping element is linked to a mirror device suchthat dithering of the sweeping element causes the mirror to vary inposition.
 8. The device of claim 1, further comprising: a pulse widthmodulator that inputs the pulse train signal of the overlap sensecircuit and produces a pulse width modulated signal from the pulse trainsignal.
 9. The device of claim 8, wherein the pulse width modulatorfurther comprises: a comparator that compares a level of the pulse trainsignal to a threshold; and a flip-flop coupled to the comparator; andwherein the pulse width modulated signal is generated from the output ofthe flip-flop.
 10. The device of claim 8, further comprising: acontroller coupled to the pulse width modulator and receiving the pulsewidth modulated signal; and a sweep element drive coupled to thecontroller; wherein based on an output of the controller, the sweepelement drive controls a dithering amplitude of the sweeping element.11. The device of claim 10, wherein the controller adjusts the sweepelement drive to drive the pulse width modulated signal towards aspecified duty cycle.
 12. The device of claim 10, wherein the controllerfurther comprises: an integrator that receives and integrates the pulsewidth modulated signal; and a feedback controller that generated theoutput of the controller; wherein the feedback controller controls theoutput of the controller to drive an output of the integrator towardszero.
 13. The device of claim 12, wherein the feedback controller is aproportional-integral-derivative (PID) controller.
 14. A ditheringmethod for a controlling a micro-electromechanical system (MEMS) device,the method comprising: moving a sweeping element that dithers in a planeparallel to a surface of a stator, the stator having a first marker anda second marker arranged on the surface of the stator to form a sensingpattern, wherein the sweeping element follows a sweep path that crossesthe first marker and a second marker; sensing an area overlap betweenthe sweeping element and the sensing pattern, generating a pulse trainsignal output that varies as a function of the area overlap; andpulse-width-modulating to produce a pulse width modulated signal fromthe pulse train signal.
 15. The method of claim 14, further comprising:controlling a dithering amplitude of the sweeping element to drive thepulse width modulated signal to a specified duty cycle.
 16. The methodof claim 14, wherein the sweeping element is a rotor that dithers inangle in the plane parallel to the stator about an axis and the firstmarker and the second marker form an X sensing pattern centered at theaxis.
 17. The method of claim 14, wherein the sweeping element dithersalong a linear sweep path in the plane parallel to the stator and thefirst marker and the second marker are oriented parallel to each otheralong the linear sweep path.
 18. The method of claim 14, wherein theoverlap sense circuit is electrically coupled to the first marker, thesecond marker and the sweeping element; and wherein the pulse trainsignal is generated as a function of capacitance between the sweepingelement and the sensing pattern.
 19. The method of claim 14, wherein thepulse train signal is generated as a function of light from a lightsource as received by at least one photo-detector.
 20. The method ofclaim 14, wherein the sweeping element is linked to a MEMS gyroscopedevice such that dithering of the sweeping element causes dithering ofan orientation of an input axis of the MEMS.